home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1999 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'UPTShellUtils.pas' rev: 4.00
-
- #ifndef UPTShellUtilsHPP
- #define UPTShellUtilsHPP
-
- #pragma delphiheader begin
- #pragma option push -w-
- #include <UPTShell95.hpp> // Pascal unit
- #include <ComObj.hpp> // Pascal unit
- #include <Classes.hpp> // Pascal unit
- #include <Forms.hpp> // Pascal unit
- #include <Messages.hpp> // Pascal unit
- #include <OLE2.hpp> // Pascal unit
- #include <Dialogs.hpp> // Pascal unit
- #include <ShellAPI.hpp> // Pascal unit
- #include <SysUtils.hpp> // Pascal unit
- #include <Windows.hpp> // Pascal unit
- #include <SysInit.hpp> // Pascal unit
- #include <System.hpp> // Pascal unit
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Uptshellutils
- {
- //-- type declarations -------------------------------------------------------
- #pragma option push -b-
- enum TCSIDL { csidlDesktop, csidl_None1, csidlPrograms, csidlControls, csidlPrinters, csidlPersonal,
- csidlFavorites, csidlStartup, csidlRecent, csidlSendTo, csidlBitBucket, csidlStartMenu, csidl_None2,
- csidl_None3, csidl_None4, csidl_None5, csidlDesktopDirectory, csidlDrives, csidlNetwork, csidlNethood,
- csidlFonts, csidlTemplates, csidlCommonStartMenu, csidlCommonPrograms, csidlCommonStartup, csidlCommonDesktopDirectory,
- csidlAppData, csidlPrintHood, csidlNone };
- #pragma option pop
-
- #pragma pack(push, 1)
- struct TPTModuleVersion
- {
-
- union
- {
- struct
- {
- int _3;
- int version;
-
- };
- struct
- {
- Word _1;
- Word _2;
- Word minor;
- Word major;
-
- };
- struct
- {
- int dw1;
- int dw2;
-
- };
- struct
- {
- Word w1;
- Word w2;
- Word w3;
- Word w4;
-
- };
-
- };
- } ;
- #pragma pack(pop)
-
- typedef TPTModuleVersion *PPTModuleVersion;
-
- #pragma option push -b-
- enum TPTFriendlyNameFlags { ptfnNormal, ptfnInFolder, ptfnForParsing };
- #pragma option pop
-
- #pragma option push -b-
- enum TPTShellIconSize { ptsizSmall, ptsizLarge };
- #pragma option pop
-
- class DELPHICLASS TPTIdListArray;
- #pragma pack(push, 4)
- class PASCALIMPLEMENTATION TPTIdListArray : public System::TObject
- {
- typedef System::TObject inherited;
-
- protected:
- Uptshell95::TItemIDList *mPidl;
- Uptshell95::TItemIDList *mLastItem;
- int __fastcall GetCount(void);
- Uptshell95::PItemIDList __fastcall GetItem(int idx);
-
- public:
- __fastcall TPTIdListArray(Uptshell95::PItemIDList p);
- __fastcall virtual ~TPTIdListArray(void);
- Uptshell95::PItemIDList __fastcall GoUp(int items);
- __property int ItemCount = {read=GetCount, nodefault};
- __property Uptshell95::PItemIDList Item[int idx] = {read=GetItem/*, default*/};
- };
-
- #pragma pack(pop)
-
- class DELPHICLASS TPTPidlList;
- #pragma pack(push, 4)
- class PASCALIMPLEMENTATION TPTPidlList : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- Classes::TList* FList;
- bool FSorted;
- Uptshell95::IShellFolder* FShellFolder;
- IMalloc* FMalloc;
- Classes::TDuplicates FDuplicates;
- Uptshell95::PItemIDList __fastcall GetPIDL(int Index);
- void __fastcall SetPIDL(int Index, Uptshell95::PItemIDList PIDL);
- void * __fastcall GetObject(int Index);
- void __fastcall SetObject(int Index, void * aObject);
- void __fastcall SetSorted(bool isSorted);
- int __fastcall GetCount(void);
- int __fastcall GetCapacity(void);
- void __fastcall SetCapacity(int cap);
-
- protected:
- bool __fastcall BinarySearch(const Uptshell95::PItemIDList PIDL, int &Index);
- bool __fastcall LinearSearch(const Uptshell95::PItemIDList PIDL, int &Index);
-
- public:
- __fastcall TPTPidlList(void);
- __fastcall virtual ~TPTPidlList(void);
- virtual int __fastcall Add(const Uptshell95::PItemIDList PIDL);
- virtual int __fastcall AddObject(const Uptshell95::PItemIDList PIDL, System::TObject* aObject);
- void __fastcall Delete(int index);
- void __fastcall Clear(void);
- int __fastcall IndexOf(const Uptshell95::PItemIDList PIDL);
- void __fastcall Insert(int Index, Uptshell95::PItemIDList Pidl);
- void __fastcall InsertObject(int Index, Uptshell95::PItemIDList Pidl, void * aObject);
- void __fastcall Sort(void);
- __property Uptshell95::PItemIDList PIDLs[int index] = {read=GetPIDL, write=SetPIDL/*, default*/};
- __property void * Objects[int index] = {read=GetObject, write=SetObject};
- __property bool Sorted = {read=FSorted, write=SetSorted, nodefault};
- __property IMalloc* Malloc = {read=FMalloc, write=FMalloc};
- __property int Count = {read=GetCount, nodefault};
- __property Uptshell95::IShellFolder* ShellFolder = {read=FShellFolder, write=FShellFolder};
- __property Classes::TDuplicates Duplicates = {read=FDuplicates, write=FDuplicates, nodefault};
- __property int Capacity = {read=GetCapacity, write=SetCapacity, nodefault};
- };
-
- #pragma pack(pop)
-
- #pragma option push -b-
- enum TLinkDataOption { ldoUseDesc, ldoUseArgs, ldoUseIcon, ldoUseWorkDir, ldoUseHotKey, ldoUseShowCmd
- };
- #pragma option pop
-
- typedef Set<TLinkDataOption, ldoUseDesc, ldoUseShowCmd> TLinkDataOptions;
-
- #pragma pack(push, 4)
- struct TLinkData
- {
- AnsiString pathName;
- TLinkDataOptions options;
- AnsiString desc;
- AnsiString args;
- AnsiString iconPath;
- int iconIndex;
- AnsiString workingDir;
- int showCmd;
- Word hotkey;
- bool noUI;
- Uptshell95::TItemIDList *idList;
- _WIN32_FIND_DATAA w32fd;
- } ;
- #pragma pack(pop)
-
- typedef void __fastcall (__closure *TPTDeviceChangeEvent)(System::TObject* ASender, Messages::TMessage
- &AMessage);
-
- class DELPHICLASS TPTDeviceChangeHandler;
- #pragma pack(push, 4)
- class PASCALIMPLEMENTATION TPTDeviceChangeHandler : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- bool FActive;
- HWND FWindowReceiver;
- Classes::TList* FNotifyList;
-
- protected:
- void __fastcall DeleteItem(int AItemIndex);
- void __fastcall WndProc(Messages::TMessage &AMessage);
- void __fastcall BroadcastToList(Messages::TMessage &AMessage);
-
- public:
- __fastcall TPTDeviceChangeHandler(void);
- __fastcall virtual ~TPTDeviceChangeHandler(void);
- void __fastcall Add(TPTDeviceChangeEvent AToNotify);
- void __fastcall Remove(TPTDeviceChangeEvent AToNotify);
- __property bool Active = {read=FActive, write=FActive, nodefault};
- };
-
- #pragma pack(pop)
-
- //-- var, const, procedure ---------------------------------------------------
- static const int COMCTL32_VER580 = 0x50050;
- static const int COMCTL32_VER472 = 0x40048;
- static const int COMCTL32_VER471 = 0x40047;
- static const int COMCTL32_VER470 = 0x40046;
- static const int COMCTL32_VER400 = 0x40000;
- extern PACKAGE TPTModuleVersion COMCTL32_VER;
- extern PACKAGE int gFlushDriveInfoSem;
- #define PTSH_CMDS_DELETE "delete"
- #define PTSH_CMDS_PASTE "paste"
- #define PTSH_CMDS_CUT "cut"
- #define PTSH_CMDS_COPY "copy"
- #define PTSH_CMDS_PROPERTIES "properties"
- #define PTSH_CMDS_EXPLORE "explore"
- #define PTSH_CMDS_OPEN "open"
- #define PTSH_CMDS_FIND "find"
- #define PTSH_CMDS_LINK "link"
- #define PTSH_CMDS_DUN_CREATE "create"
- #define PTSH_CMDS_DUN_CONNECT "connect"
- #define PTSH_CMDID_FORMAT (char *)(0x23)
- static const Shortint DBT_DEVNODES_CHANGED = 0x7;
- static const Shortint DBT_QUERYCHANGECONFIG = 0x17;
- static const Shortint DBT_CONFIGCHANGED = 0x18;
- static const Shortint DBT_CONFIGCHANGECANCELED = 0x19;
- static const Shortint DBT_MONITORCHANGE = 0x1b;
- static const Shortint DBT_SHELLLOGGEDON = 0x20;
- static const Shortint DBT_CONFIGMGAPI32 = 0x22;
- static const Shortint DBT_VXDINITCOMPLETE = 0x23;
- static const Word DBT_VOLLOCKQUERYLOCK = 0x8041;
- static const Word DBT_VOLLOCKLOCKTAKEN = 0x8042;
- static const Word DBT_VOLLOCKLOCKFAILED = 0x8043;
- static const Word DBT_VOLLOCKQUERYUNLOCK = 0x8044;
- static const Word DBT_VOLLOCKLOCKRELEASED = 0x8045;
- static const Word DBT_VOLLOCKUNLOCKFAILED = 0x8046;
- static const Shortint DBT_NO_DISK_SPACE = 0x47;
- static const Shortint DBT_LOW_DISK_SPACE = 0x48;
- static const Word DBT_DEVICEARRIVAL = 0x8000;
- static const Word DBT_DEVICEQUERYREMOVE = 0x8001;
- static const Word DBT_DEVICEQUERYREMOVEFAILED = 0x8002;
- static const Word DBT_DEVICEREMOVEPENDING = 0x8003;
- static const Word DBT_DEVICEREMOVECOMPLETE = 0x8004;
- static const Word DBT_DEVICETYPESPECIFIC = 0x8005;
- static const Shortint DBT_DEVTYP_OEM = 0x0;
- static const Shortint DBT_DEVTYP_DEVNODE = 0x1;
- static const Shortint DBT_DEVTYP_VOLUME = 0x2;
- static const Shortint DBT_DEVTYP_PORT = 0x3;
- static const Shortint DBT_DEVTYP_NET = 0x4;
- static const Shortint DBT_DEVTYP_DEVICEINTERFACE = 0x5;
- static const Shortint DBT_DEVTYP_HANDLE = 0x6;
- extern PACKAGE bool __fastcall IsWin95(void);
- extern PACKAGE bool __fastcall IsOSR2OrGreater(void);
- extern PACKAGE bool __fastcall IsWinNT(void);
- extern PACKAGE bool __fastcall IsWin2000(void);
- extern PACKAGE bool __fastcall HasWin95Shell(void);
- extern PACKAGE bool __fastcall GetModuleVersion(const AnsiString aModuleName, TPTModuleVersion &aVersion
- );
- extern PACKAGE void * __fastcall ShellMemAlloc(unsigned size);
- extern PACKAGE void * __fastcall ShellMemRealloc(void * p, unsigned size);
- extern PACKAGE void __fastcall ShellMemFree(void * p);
- extern PACKAGE IMalloc* __fastcall ShellIMalloc(void);
- extern PACKAGE unsigned __fastcall ShellGetFolderFromIdList(Uptshell95::PItemIDList p, Uptshell95::IShellFolder*
- &ish);
- extern PACKAGE unsigned __fastcall ShellGetIdListFromPath(const AnsiString path, Uptshell95::PItemIDList
- &p);
- extern PACKAGE AnsiString __fastcall ShellGetPathFromIdList(Uptshell95::PItemIDList p);
- extern PACKAGE AnsiString __fastcall ShellGetDisplayPathName(AnsiString aPathName);
- extern PACKAGE AnsiString __fastcall ShellGetSpecialFolderPath(int ahwnd, TCSIDL csidl);
- extern PACKAGE unsigned __fastcall ShellGetSpecialFolderIdList(int ahwnd, TCSIDL csidl, Uptshell95::PItemIDList
- &idlist);
- extern PACKAGE int __fastcall ShellGetIconIndex(Uptshell95::PItemIDList absIdList, unsigned uFlags);
-
- extern PACKAGE int __fastcall ShellGetIconIndexFromPath(const AnsiString path, unsigned uFlags);
- extern PACKAGE int __fastcall ShellGetIconIndexFromExt(const AnsiString ext, unsigned uFlags);
- extern PACKAGE int __fastcall ShellGetSpecialFolderIconIndex(TCSIDL csidl, unsigned uFlags);
- extern PACKAGE TCSIDL __fastcall ShellFindCSIDLFromIdList(Uptshell95::PItemIDList aIdList);
- extern PACKAGE AnsiString __fastcall ShellGetFriendlyNameFromIdList(Uptshell95::IShellFolder* ishf,
- Uptshell95::PItemIDList pidl, TPTFriendlyNameFlags flags);
- extern PACKAGE unsigned __fastcall ShellGetSystemImageList(TPTShellIconSize aSize);
- extern PACKAGE AnsiString __fastcall StrretToString(Uptshell95::PItemIDList pidl, const Uptshell95::TStrRet
- &r);
- extern PACKAGE void __fastcall StrretFree(const Uptshell95::TStrRet &r);
- extern PACKAGE AnsiString __fastcall EnsureTrailingCharDB(const AnsiString aSource, char aTrailingChar
- );
- extern PACKAGE int __fastcall IdListLen(Uptshell95::PItemIDList pidl);
- extern PACKAGE int __fastcall CompareAbsIdLists(Uptshell95::PItemIDList pidl1, Uptshell95::PItemIDList
- pidl2);
- extern PACKAGE Uptshell95::PItemIDList __fastcall ConcatIdLists(IMalloc* ishm, Uptshell95::PItemIDList
- aFirst, Uptshell95::PItemIDList aSecond);
- extern PACKAGE Uptshell95::PItemIDList __fastcall CopyIdList(IMalloc* ishm, Uptshell95::PItemIDList
- pidl);
- extern PACKAGE unsigned __fastcall CreateShortcut(const AnsiString linkPathName, const TLinkData &linkData
- );
- extern PACKAGE unsigned __fastcall CreateQuickShortcut(const AnsiString linkPathName, const AnsiString
- targetPathName);
- extern PACKAGE unsigned __fastcall ResolveShortcut(const AnsiString linkPathName, TLinkData &linkData
- , bool afWantIdList);
- extern PACKAGE bool __fastcall PTClsidFromFileType(AnsiString aExtension, GUID &aCLSID);
- extern PACKAGE void __fastcall FlushDriveInfoCache(void);
- extern PACKAGE void __fastcall LockFlushDriveInfoCache(void);
- extern PACKAGE void __fastcall UnlockFlushDriveInfoCache(void);
- extern PACKAGE AnsiString __fastcall FormatStrPos(AnsiString aFmtStr, const AnsiString * data, const
- int data_Size);
- extern PACKAGE void __fastcall ParametizeCmdLineDB(const AnsiString ins, Classes::TStrings* outs);
- extern PACKAGE AnsiString __fastcall TrimRightDB(AnsiString Str);
- extern PACKAGE void __fastcall CopyCharDB(int &APos, const AnsiString ASource, AnsiString &ADest);
- extern PACKAGE TPTDeviceChangeHandler* __fastcall PTDeviceChangeHandler(void);
-
- } /* namespace Uptshellutils */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Uptshellutils;
- #endif
- #pragma option pop // -w-
-
- #pragma delphiheader end.
- //-- end unit ----------------------------------------------------------------
- #endif // UPTShellUtils
-